<%@ page language="java" pageEncoding="UTF-8" %>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

        <script>

        </script>
        <div class="searchbar">
            <div class="allsort">
                <div id="allcatagory">
                    <a href="javascript:void(0);">全部商品分类</a>
                    <select name="categoryId" style="width: 100px;text-align: center"
                        onchange="javascript:location.href='/goods?opr=list&cid='+this.value">
                        <option value="0">请选择</option>
                        <c:forEach items="${categories}" var="category">
                            <option value="${category.id}">${category.categoryName}</option>
                        </c:forEach>
                    </select>
                </div>

                <!--总的商品分类-开始-->
                <ul class="sortlist" id='div_allsort' style='display:none'>
                    <li>
                        <h2>
                            <c:forEach items="${categoryTags}" var="categoryTag">
                                <a href="">${categoryTag.categoryName}</a>
                            </c:forEach>
                        </h2>
                    </li>
                </ul>
            </div>

            <div class="searchbox">
                <form method='get' action=''>
                    <input type='hidden' name='controller' value='site' /> <input type='hidden' name='action'
                        value='search_list' /> <input class="text" type="text" name='word' autocomplete="off"
                        placeholder="输入关键字..." /> <input class="btn" type="submit" value="商品搜索"
                        onclick="checkInput('word','输入关键字...');" />
                </form>

            </div>
            <div class="hotwords">热门搜索：军事|历史|悬疑</div>
        </div>
        <script>
			$(function () {
				let allcatagory=$("#allcatagory").html();
				localStorage.setItem("allcatagory",allcatagory); 
			})
		</script>